
	var popWin;
	function doDeleteRow(dRow)
	{
		var i=dRow.parentNode.parentNode.rowIndex;
		document.getElementById('customTagTbl').deleteRow(i);
		//Formデータが有る非表示テーブルの列も削除
		document.getElementById('hiddenCustomTagTbl').deleteRow(i);
	}


	function popCustomSchema(tableRow,metaType){
		var param="?metaType="+metaType;
		var i;
		if(tableRow != undefined){
		  i=tableRow.parentNode.parentNode.rowIndex;
		  param=param+"&rowIndex="+i;
		}
		popWin = window.open('popupCustomSchema'+param,'child1', 'width=650, height=600, menubar=no, toolbar=no, scrollbars=yes');
	}


	/*****
	*  メタデータスキーマ入力形式変更処理
	***/
	var metaTblRow;
	//入力形式種類
	var inputTypeFlg =0;
	//ドロップダウン、ラジオ、チェックボックスのリスト内容
	var inputTypeOption ="";

	var freeKbn;

	var rowIdx;

	function getInputTypeOption(){
		return inputTypeOption;
	}

	function getInputFlg(){
		return inputTypeFlg;
	}

	function getFreeKbn(){
	 return freeKbn;
	}

	//メタタグの入力形式編集ボタン処理
	function popupCretaeInput(dRow){
	    inputTypeFlg =0;
	    inputTypeOption ="";
	    freeKbn ="";

		rowIdx=dRow.parentNode.parentNode.rowIndex;
		//alert("document.addForm.typeFlg[rowIdx-1]:"+document.addForm.elements['typeFlg'][rowIdx-1].value);
		if(document.addForm.typeFlg[eval(rowIdx-1)] != undefined){
			inputTypeFlg = document.addForm.elements['typeFlg'][eval(rowIdx-1)].value;
			inputTypeOption = document.addForm.elements['options'][eval(rowIdx-1)].value;
			freeKbn = document.addForm.elements['freeKbn'][eval(rowIdx-1)].value;
		}
		popWin = window.open('popupCreateInputItem','child1', 'width=650, height=600, menubar=no, toolbar=no, scrollbars=yes');
	}

	//メタデータの入力形式を設定
	function setInputType(inputTypeFlg,inputTypeName,tagOptionArr,freeKbn){
		//alert("rowIdx"+rowIdx);
		if(tagOptionArr != undefined && tagOptionArr !=""){
			document.addForm.elements['options'][eval(rowIdx-1)].value = tagOptionArr;
		}else{
			document.addForm.elements['options'][eval(rowIdx-1)].value = 0;
		}

		document.addForm.elements['typeFlg'][eval(rowIdx-1)].value = inputTypeFlg;
		document.addForm.elements['type'][eval(rowIdx-1)].value = inputTypeName;
		document.addForm.elements['freeKbn'][eval(rowIdx-1)].value = freeKbn;

		var rowTagId = "type"+rowIdx;

		var spanObj = document.getElementById(rowTagId);
		spanObj.innerHTML = inputTypeName;
		rowIdx="";
		//alert(spanObj.innerHTML);
	}

	//親画面が画面遷移した場合、子画面(ポップアップ)画面を閉じる
	function doUnload(){
		if(popWin && !popWin.closed){
			popWin.close();
		}
	}



	//TM情報を選択列のデータに設定
	function setTmInfo(tmSi,tmName){
		rowIdx = rowIdx -1;
		/*alert("rowIdx:"+rowIdx);
		alert("tmSi:"+tmSi);
		alert("tmName:"+tmName);
		*/

		if(document.form1.elements["contentsTag"+rowIdx] !=undefined && tmSi != undefined){
	 		document.form1.elements["contentsTag"+rowIdx].value=tmName;
	 		document.getElementById("tm_"+rowIdx).innerHTML = tmName;
	 		document.form1.tmSi[rowIdx].value=tmSi;
	 	}
	 	rowIdx="";
	}